A client can establish a connection with a server and request data. The server can then respond to the request with packets of data. In response, the client can send additional packets requesting more data from the server. The additional packets also include an acknowledgement (ACK) for the received packets of data. The ACK allows the server to know that the packets it sent were received successfully and that it can continue to send more data. For example, a transmission control protocol (TCP) window, which is the amount of outstanding data the server can send before receiving acknowledgement, may be reached and the server has to stop sending data.
The packets sent between the client and server may pass through a billing gateway, which may be configured to inspect the packets for billing purposes, etc. If one of the TCP packets sent from the client is lost before it is received by the billing gateway, the billing gateway queues the subsequent packets it receives and waits for the lost packet. For example, if three TCP packets are sent from the client in sequence and a first one is lost, then the second and third packets are queued until the first packet is received. This may be because a request is spread across the payload of these packets and the entire request needs to be parsed in order to bill the packets properly prior to sending the packets to the server. Because of the queuing, the packets including the ACKs for the previously sent packets are not sent to the server. When the server does not receive an ACK, the server may re-transmit the packets it previously sent after not receiving an ACK for the sequence number associated with these packets. After retransmission, the client may resend the lost packet and then the lost packet and the queued packets may be sent to the server. Because the server retransmitted the packets, an increase in network traffic occurs, which may be undesirable. Also, servers may not tolerate many occurrences of retransmission behavior and may close the connection with the client. Further, even if servers are tolerant of retransmissions, they may reduce the transmission control protocol (TCP) window, which increases TCP overhead and slows connection throughput.